﻿
/* 
 * Since 2008 - 2012
 */
package com.hh.bss.auth.entity;

import javax.validation.constraints.*;
import org.hibernate.validator.constraints.*;
import org.apache.commons.lang.builder.EqualsBuilder;
import org.apache.commons.lang.builder.HashCodeBuilder;
import org.apache.commons.lang.builder.ToStringBuilder;
import org.apache.commons.lang.builder.ToStringStyle;

import java.util.*;

import com.hh.bss.auth.dao.*;
import com.hh.bss.auth.entity.*;
import com.hh.bss.auth.service.*;
import com.hh.bss.auth.vo.query.*;
import com.hh.bss.base.*;
import com.hh.bss.common.page.*;
import com.hh.bss.common.page.impl.*;
import com.hh.bss.util.*;





public class SystemRoleDataControl extends BaseEntity implements java.io.Serializable{
	private static final long serialVersionUID = 5454155825314635342L;
	public static String RANGE_PRIVATE="PRIVATE";
	public static String RANGE_GROUP="GROUP";
	public static String RANGE_AREA="AREA";
	public static String RANGE_COMPANY="COMPANY";
	public static String CONTROL_TYPE_LIST="LIST";
	public static String CONTROL_TYPE_VIEW="VIEW";
	public static String CONTROL_TYPE_DELETE="DELETE";
	public static String CONTROL_TYPE_UPDATE="UPDATE";
	public static String CONTROL_TYPE_ADD="ADD";
	//alias
	public static final String TABLE_ALIAS = "SystemRoleDataControl";
	public static final String ALIAS_ID = "id";
	public static final String ALIAS_ROLE_ID = "roleId";
	public static final String ALIAS_FUNCTION_CODE = "functionCode";
	public static final String ALIAS_GR = "gr";
	public static final String ALIAS_GU = "gu";
	public static final String ALIAS_GD = "gd";
	public static final String ALIAS_AR = "ar";
	public static final String ALIAS_AU = "au";
	public static final String ALIAS_AD = "ad";
	public static final String ALIAS_CR = "cr";
	public static final String ALIAS_CU = "cu";
	public static final String ALIAS_CD = "cd";
	public static final String ALIAS_CREATE_DT = "createDt";
	
	//date formats
	public static final String FORMAT_CREATE_DT = DATE_FORMAT;
	
	//可以直接使用: @Length(max=50,message="用户名长度不能大于50")显示错误消息
	//columns START
	
	private java.lang.Integer id;
	private java.lang.Integer did;
	
	public java.lang.Integer getDid() {
		return did;
	}

	public void setDid(java.lang.Integer did) {
		this.did = did;
	}

	private java.lang.Integer roleId;
	@Length(max=30)
	private java.lang.Integer dataId;
	public java.lang.Integer getDataId() {
		return dataId;
	}

	public void setDataId(java.lang.Integer dataId) {
		this.dataId = dataId;
	}

	private String dataName;
	

	public String getDataName() {
		return dataName;
	}

	public void setDataName(String dataName) {
		this.dataName = dataName;
	}

	private java.lang.Integer gr;
	
	private java.lang.Integer gu;
	
	private java.lang.Integer gd;
	
	private java.lang.Integer ar;
	
	private java.lang.Integer au;
	
	private java.lang.Integer ad;
	
	private java.lang.Integer cr;
	
	private java.lang.Integer cu;
	
	private java.lang.Integer cd;
	
	private java.util.Date createDt;
	//columns END

	public SystemRoleDataControl(){
	}

	public SystemRoleDataControl(
		java.lang.Integer id
	){
		this.id = id;
	}

	public void setId(java.lang.Integer value) {
		this.id = value;
	}
	
	public java.lang.Integer getId() {
		return this.id;
	}
	public void setRoleId(java.lang.Integer value) {
		this.roleId = value;
	}
	
	public java.lang.Integer getRoleId() {
		return this.roleId;
	}
	


	public void setGr(java.lang.Integer value) {
		this.gr = value;
	}
	
	public java.lang.Integer getGr() {
		return this.gr;
	}
	public void setGu(java.lang.Integer value) {
		this.gu = value;
	}
	
	public java.lang.Integer getGu() {
		return this.gu;
	}
	public void setGd(java.lang.Integer value) {
		this.gd = value;
	}
	
	public java.lang.Integer getGd() {
		return this.gd;
	}
	public void setAr(java.lang.Integer value) {
		this.ar = value;
	}
	
	public java.lang.Integer getAr() {
		return this.ar;
	}
	public void setAu(java.lang.Integer value) {
		this.au = value;
	}
	
	public java.lang.Integer getAu() {
		return this.au;
	}
	public void setAd(java.lang.Integer value) {
		this.ad = value;
	}
	
	public java.lang.Integer getAd() {
		return this.ad;
	}
	public void setCr(java.lang.Integer value) {
		this.cr = value;
	}
	
	public java.lang.Integer getCr() {
		return this.cr;
	}
	public void setCu(java.lang.Integer value) {
		this.cu = value;
	}
	
	public java.lang.Integer getCu() {
		return this.cu;
	}
	public void setCd(java.lang.Integer value) {
		this.cd = value;
	}
	
	public java.lang.Integer getCd() {
		return this.cd;
	}
	public String getCreateDtString() {
		return DateConvertUtils.format(getCreateDt(), FORMAT_CREATE_DT);
	}
	public void setCreateDtString(String value) {
		setCreateDt(DateConvertUtils.parse(value, FORMAT_CREATE_DT,java.util.Date.class));
	}
	
	public void setCreateDt(java.util.Date value) {
		this.createDt = value;
	}
	
	public java.util.Date getCreateDt() {
		return this.createDt;
	}

	public String toString() {
		return new ToStringBuilder(this,ToStringStyle.MULTI_LINE_STYLE)
			.append("Id",getId())
			.append("RoleId",getRoleId())			
			.append("Gr",getGr())
			.append("Gu",getGu())
			.append("Gd",getGd())
			.append("Ar",getAr())
			.append("Au",getAu())
			.append("Ad",getAd())
			.append("Cr",getCr())
			.append("Cu",getCu())
			.append("Cd",getCd())
			.append("CreateDt",getCreateDt())
			.toString();
	}
	
	public int hashCode() {
		return new HashCodeBuilder()
			.append(getId())
			.toHashCode();
	}
	
	public boolean equals(Object obj) {
		if(obj instanceof SystemRoleDataControl == false) return false;
		if(this == obj) return true;
		SystemRoleDataControl other = (SystemRoleDataControl)obj;
		return new EqualsBuilder()
			.append(getId(),other.getId())
			.isEquals();
	}
}

